import { FunctionInfo } from '../entities/types';

export class TemplateMethod {
    /**
     * 检测是否为模板方法
     * @param functionInfo 函数信息
     * @returns 是否为模板方法
     */
    static async extract(functionInfo: FunctionInfo): Promise<boolean> {
        const code = functionInfo.code || functionInfo.text || '';
        return code.includes('template') || code.includes('<') && code.includes('>');
    }
}

